package com.vogue.meeting.generator;

import cn.org.atool.generator.FileGenerator;
import cn.org.atool.generator.annotation.Table;
import cn.org.atool.generator.annotation.Tables;

/**
 * fluent代码生成器
 */
public class FluentCodeGenerator
{
    public static final String url = "jdbc:mysql://localhost:3306/db_meeting?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&&serverTimezone=GMT%2B8";

    public static void main( String[] args )
    {
        System.out.println("不要随便执行！！！会覆盖之前的代码");
        //FileGenerator.build(Empty.class);
    }

    @Tables(
            // 设置数据库连接信息
            url = url, username = "root", password = "123456",
            // 设置entity类生成src目录, 相对于 user.dir
            srcDir = "src/main/java",
            // 设置entity类的package值
            basePack = "com.vogue.meeting.fluent",
            // 设置dao接口和实现的src目录, 相对于 user.dir
            daoDir = "src/main/java",
            gmtCreated = "create_time",
            gmtModified = "update_time",
            // 设置哪些表要生成Entity文件
            tables = {
                    @Table(value = {
                    "user",
                    "meeting",})
            }
    )
    static class Empty {
        //没有抽取entity公共方法
    }

}
